<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../comm-header.jsp" %>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <c:set var="contextPath" value="${pageContext.request.contextPath}" scope="application" />
    <title>授权登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no">
    <link rel="shortcut icon" href="${contextPath}/favicon.ico" type="image/x-icon" />
    <link href="${contextPath}/resources/yhzx/css/bootstrap.css" rel="stylesheet">
    <link href="${contextPath}/resources/yhzx/css/login.css" rel="stylesheet">
    <link href="${contextPath}/resources/yhzx/css/forms.css" rel="stylesheet">
    <script src="${contextPath}/resources/js/jquery.min.js"></script>
    <script src="${contextPath}/resources/js/DES3.js"></script>
    <script src="${contextPath}/resources/myjs/UCenterCommon.js"></script>

    <style>
        .input-group {
            width: 100%;
            margin-bottom: 10px;
        }
        
        .breadcrumb {
            padding: 12px 15px;
            margin-bottom: 20px;
            height: 44px;
            list-style: none;
            background-color: #f5f5f5;
            border-radius: 0px;
        }
        
        .breadcrumb {
            background-color: #0080C0;
        }
        
        .color-w {
            color: #FFF;
        }
        
        .radio,
        .checkbox {
            padding-left: 0px;
            margin-top: 40px;
        }
        
        @media (max-width:767px) {
            .yzm {
                border-left: 0px;
            }
            body {}
        }
        
        @media (min-width: 768px) {
            body {}
            .panel-body1-left {
                width: 500px;
                margin: 0 auto;
                padding: 40px 50px 50px 50px;
                background: #fff;
                margin-top: 50px;
            }
            .btn2,
            .btn,
            .btn1 {
                padding: 0px;
                margin: 0px;
                width: 100%;
                margin-top: 10px;
            }
            .text1 {
                float: right;
                padding-right: 10px;
                line-height: 20px;
            }
            .radio,
            .checkbox {
                padding-left: 0px;
                margin-top: 50px;
            }
            body {
                background: aliceblue;
            }
        }
        
        .header input {
            background: transparent;
            border: 0px;
            width: 44px;
            height: 44px;
            position: absolute;
            top: 0px;
            left: 0px;
        }
        
        .col-md-12 img {
            display: block;
            margin: 0 auto;
        }
        
        .col-md-12 h4,
        .control-label h5 {
            text-align: center;
        }
        
        .col-md-12,
        .col-xs-12 {
            padding: 0px;
        }
        
        @media (max-width: 767px) {
            .text1 {
                width: auto;
                float: right;
                line-height: 18px;
                width: 90px;
            }
            body {
                background: #fff;
            }
            .main {
                padding: 0px 10px;
            }
            .btn {
                border-radius: 2px
            }
            .xdw-form>input:focus,
            .xdw-form>textarea:focus,
            .xdw-form>select:focus {
                border-bottom: 0px solid #2196F3;
            }
        }
    </style>
</head>

<body>

    <div class="main">
        <div class="panel panel-default">
            <div class="panel-body panel-body1-left">
                <div class="col-md-12">
                    <img style="width:137px;" src="${app_icon_url}">
                    <h4>用户中心授权访问</h4>
                </div>
                
                </br>

                <div class="col-xs-12 control-label">
               	 	<div class="input-group">
                		<form id="bindingForm" style="border: 1px solid #ddd;border-radius: 3px; margin:0px 1px 0px 1px;" action='${pageContext.request.contextPath}${interface_url}' method='post'>
                            <div class="xdw-form" style="padding:7px 0px 11px 0px;margin:0px;">
                            	<label class="form-text">账号</label>
                        		<input type="text" class="input standard col-sm-12" style="font-size:16px" name="username" value="${username}"/>
							</div>
                        	
                        	<div class="xdw-form" style="border-bottom: 0px;padding:5px 0px 10px 0px;margin:0px;font-size:16px">
                        		<label class="form-text">密码</label>
                        		<input type="password" class="input standard col-sm-12" id="password" name="password"/>
                       		</div>

	                       <input type="hidden" name="appid" value="<%=java.net.URLEncoder.encode(request.getParameter("appid") == null ? "" : (String) request.getParameter("appid"))%>"/>
						   <input type="hidden" name="client_id" value="<%=java.net.URLEncoder.encode(request.getParameter("client_id") == null ? "" : (String) request.getParameter("client_id"))%>"/>
						   <input type="hidden" name="scope" value="<%=java.net.URLEncoder.encode(request.getParameter("scope") == null ? "" : (String) request.getParameter("scope"))%>"/>
						   <input type="hidden" name="response_type" value="<%=java.net.URLEncoder.encode(request.getParameter("response_type") == null ? "" : (String) request.getParameter("response_type"))%>"/>
						   <input type="hidden" name="redirect_uri" value="<%=java.net.URLEncoder.encode(request.getParameter("redirect_uri") == null ? "" : (String) request.getParameter("redirect_uri"))%>"/>
						   <input type="hidden" name="state" value="<%=java.net.URLEncoder.encode(request.getParameter("state") == null ? "" : (String) request.getParameter("state"))%>"/>
						   <input type="hidden" name="client_secret" value="<%=java.net.URLEncoder.encode(request.getParameter("client_secret") == null ? "" : (String) request.getParameter("client_secret"))%>"/>
						   <input type="hidden" name="is_binding" value="true" />
						   <input type="hidden" name="auth_account" value="${auth_account}" />
						   <input type="hidden" name="app_icon_url" value="${app_icon_url}" />
						   
		                   <button type="button" onclick="UCenterCommon.bindingSubmit()" class="btn btn1" style="height:48px; margin-top:14px">绑定</button>
					    </form>
						<div style="text-align:center;width:100%; color:red;">${oauth_login_error_message}</div>
				    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>